This invention relates to an IC card and a method for writing information therein. More particularly, this invention relates to an IC card and a method for writing information in the IC card, so that an information processing program, etc. can be effectively written by down-loading in an electrically erasable and programmable non-volatile memory (an EEPROM) provided for storing such a program, etc.
In a conventional IC card used in the past, a processing program for a microprocessor was stored in a mask ROM, and the contents of the processing program could not be changed. Recently, an EEPROM is used as a program memory in an IC card, so that a program can be written later in the memory, and its contents can be changed later.
In the modern IC card described above, various registered data such as various kinds of ID information (identification information or collation information) are written later in the EEPROM, and, in addition to such a memory, a static RAM (an SRAM) or the like is incorporated as a work memory for temporarily storing data.
While the SRAM is generally advantageous over the EEPROM in that the time required for writing data (a write time) is relatively short, it has the defect that stored data becomes volatile when the power supply is cut off. On the other hand, although the EEPROM can be used as a programmable non-volatile memory, it has such a defect that, while the write time required for writing data of 1 byte in the SRAM is only in the order of microsecond, a longer write time in the order of a millisecond is required for writing data of 1 byte in the EEPROM.
Therefore, it is a prior art practice that, in the case of writing a large amount of data in the EEPROM, the data is written once in the SRAM and then written in the EEPROM. However, because a considerably large capacity is not allotted to the SRAM in the IC card, the region of the SRAM utilized as a communication buffer is limited in size, and a limited amount of data can only be transmitted at a time. Thus, it is the present status that a large amount of data is transmitted and written in the SRAM in a relation divided into groups each including a small amount of data.
Consequently, write data including duplications of data such as an initiation code, a command, an identification code, a termination code, etc. must be transmitted a plurality of times, resulting in a troublesome procedure data writing and transmission. Further, because serial processing including data reception, data writing and data confirmation is commonly executed for writing data in the IC card, division of data into a plurality of groups as described above obstructs the desired high-speed data writing.